package com.sz.app.customer.api.pay;

import com.sz.biz.common.customer.dto.CusCompanyDto;
import com.sz.biz.common.customer.entity.CusCustomer;
import com.sz.biz.common.customer.service.CustomerCompanyService;
import com.sz.biz.common.customer.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.annotation.PostConstruct;
import java.util.List;

@Controller
public class InitOldCustomerPayAccount {
    @Autowired
    private CustomerService customerService;
    @Autowired
    private CustomerCompanyService customerCompanyService;
    @PostConstruct
    public void init(){
        //TODO
//       List<CusCustomer> cusCustomerList = customerService.findCustomers();
//        for (CusCustomer cusCustomer:cusCustomerList
//             ) {
//            CusCompanyDto cusCompanyDto = customerCompanyService.findByCustomerId(cusCustomer.getId());
//            if(null!=cusCompanyDto){
//                customerService.createPayAccount(cusCustomer,cusCompanyDto);
//            }
//
//        }
        /*CusCustomer cusCustomer = cusCustomerList.get(3);
        CusCompanyDto cusCompanyDto = customerCompanyService.findByCustomerId(cusCustomer.getId());
        customerService.createPayAccount(cusCustomer,cusCompanyDto);*/
    }
}
